package com.addcn.android.design591.activity;

import android.app.Application;
import android.content.Context;

import com.addcn.android.design591.comm.Configs;
import com.addcn.android.design591.comm.ParameterUtils;
import com.addcn.android.design591.utils.L;
import com.addcn.android.design591.utils.SPUtils;

/**
 * Created by xuge on 2017/1/4.
 *
 */

public class MyApplication extends Application {

    @Override
    public Context getApplicationContext() {
        return super.getApplicationContext();
    }

    @Override
    public void onCreate() {
        super.onCreate();
        L.isDebug = true;
        getUrlHost();
    }


    //环境配置
    public void getUrlHost() {
        String evm = (String) SPUtils.get(getApplicationContext(), ParameterUtils.EVM, "release");
        if (evm.equals("release")) {
            Configs.HOST = "http://mapi.100.com.tw";
        } else {
            Configs.HOST = "http://mapi.debug.100.com.tw";
        }
    }
}
